package com.tanhua.server.controller;

import com.tanhua.server.service.HuanXinService;
import com.tanhua.server.vo.HuanXinUserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 王加鑫
 * @Date 2021/09/11 0:35
 * @Since JDK 1.8
 */

@RestController
@RequestMapping("huanxin")
public class HuanXinController {

    @Autowired
    private HuanXinService huanXinService;


    /**
     * 查询环信用户信息
     * 为聊天室查询自己的数据做准备(因为根据用户id查询数据如头像，昵称等)
     * @return
     */
    @GetMapping("user")
    public HuanXinUserVo queryHuanXinUser() {
        return this.huanXinService.queryHuanXinUser();
    }
}
